#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

//多返回值函数
//void f(int a,int b,int x,int y){//pass value fail
//    x=a+b;
//    y=a*b;
//}
//void f(int a,int b,int &x,int &y){//pass value ok  C++ solution
//    x=a+b;
//    y=a*b;
//}
void f(int a, int b, int *x, int *y) {//pass address ok C solution
    *x = a + b;
    *y = a * b;
}

int main() {
    int a = 3, b = 4;
    int sum, product;
    f(a, b, &sum, &product);
    cout << sum << endl;
    cout << product << endl;
    return 0;
}